package edu.uba.fcen.estimacion.word.selection.cleaner;

import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import edu.uba.fcen.estimacion.word.selection.constants.Constants;


public class CleanGarbage {

	
	private Map<Pattern, String> searchReplaceSomeWords = new HashMap<Pattern, String>();
	private Pattern patternPunctuation = Pattern.compile(Constants.PUNCTUATION_SYMBOL, Pattern.UNICODE_CASE);
	
	public CleanGarbage() {
		
		//Adverbs to eliminate
		searchReplaceSomeWords.put(Pattern.compile("\\bcerca\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\blejos\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\barriba\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\babajo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\balrededor\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdentro\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bfuera\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bahora\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bluego\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdespués\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bayer\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bhoy\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmañana\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bentonces\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpronto\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\btarde\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsiempre\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bbien\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmal\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\basí\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\baprisa\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdeprisa\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdespacio\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmenos\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpoco\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmucho\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bbastante\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmuy\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bcasi\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bcierto\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsí\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bno\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\btampoco\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bnunca\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bquizás\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bacaso\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\btal vez\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
				
		//Symbols to delete
		searchReplaceSomeWords.put(Pattern.compile(Constants.PUNCTUATION_SYMBOL, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bque\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bademás\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bincluso\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\basimismo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\btambién\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bparalelamente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bbien\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bporque\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpues\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bya que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		
		//Symbols to replace
		searchReplaceSomeWords.put(Pattern.compile("\\bpero\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\baunque\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmas\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsino\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bexcepto\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsalvo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmenos\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben segundo lugar\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE),  Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsumado a\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE),  Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor otra parte\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE),  Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor este motivo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor esta razón\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor lo dicho\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor lo cual\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor lo que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor lo tanto\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor eso\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor esto\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor ello\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor el contrario\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor más que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor arriba de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor debajo de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor una parte\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor último\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor ende\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor consiguiente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor lo que sigue\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsin embargo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE),  Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben otro orden de cosas\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bal mismo tiempo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bde la misma manera\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\botro caso más\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bentre otras\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bya sea\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdado que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ba causa de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdebido a que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\baunque\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsi bien\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\baun cuando\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpese a\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bde todas maneras\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bentre otras\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bantes\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bhace tiempo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bhabía una vez\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bal principio\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bal comienzo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\banteriormente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpreviamente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\btiempo atrás\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bantes de que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben primer lugar\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\binicialmente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmientras tanto\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ba la vez\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bcuando\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bfue entonces cuando\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmientras\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsimultáneamente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bactualmente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmás tarde\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bcon el paso del tiempo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bposteriormente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bfinalmente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\baparte de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmas aun\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\baquí\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bahí\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ballí\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdelante de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bencima de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben este\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben ese\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben aquel\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bal lado de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben medio de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bes decir\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben otras palabras\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmejor dicho\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bmás precisamente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdicho de otro modo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdicho de otra manera\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben pocas palabras\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bresumiendo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bo sea\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben cuanto a\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\brespecto de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bcon referencia a\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpor otro lado\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben lo que concierne a\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bigualmente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdel mismo modo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bde la misma manera\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben cambio\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bcontrariamente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\binversamente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bfinalmente\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben resumen\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben síntesis\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben definitiva\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben conclusión\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsintetizando\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpara concluir\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben consecuencia\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bde ahí que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bde manera que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bcon que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ben caso de\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsiempre que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ba menos que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ba no ser que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bconque\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\basí pues\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bpues bien\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\basí que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bde modo que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bde manera que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bno obstante\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bantes bien\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bsi no que\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\ba menudo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bA menudo\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		//Trash
		searchReplaceSomeWords.put(Pattern.compile("\\bdoc\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\bdoc\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		searchReplaceSomeWords.put(Pattern.compile("\\betc\\b", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE), Constants.TEXT_TO_REPLACE);
		
	}
	
	public String clean(String line) {
		Matcher match = patternPunctuation.matcher(line);
		String stringWithoutPunctuation = match.replaceAll(Constants.TEXT_TO_REPLACE);
		String replaceAllConnectors = stringWithoutPunctuation;
		
		for (Pattern key : searchReplaceSomeWords.keySet()) {
			replaceAllConnectors = key.matcher(replaceAllConnectors).replaceAll(searchReplaceSomeWords.get(key));
		}
		return replaceAllConnectors;
	}
	
}
